package sdu.icat.sys.smodel;

import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

import org.hibernate.annotations.CreationTimestamp;
import org.hibernate.annotations.UpdateTimestamp;

@Entity
@Table(name="sys_article")
public class SysArticle {

    @Id
    @GeneratedValue
    private long id;
    
    /**
     * 类型
     */
    private String type;
    
    /**
     * 作者
     */
    private String author;
    
    /**
     * 标题
     */
    @Column(nullable=false)
    private String title;
    
    /**
     * 内容
     */
    @Column(nullable=false)
    private String content;
    
    /**
     * 外部链接
     */
    private String outUrl;
    
    /**
     * seo关键字
     */
    private String seoKeyword;
    
    /**
     * seo描述
     */
    private String seoDescription;
    
    /**
     * 是否置顶
     */
    private Integer isTop;
    
    @Temporal(TemporalType.TIME)
    @CreationTimestamp
    private Date createTime;

    @Temporal(TemporalType.TIME)
    @UpdateTimestamp
    private Date updateTime;
    
    public long getId() {
        return id;
    }

    public void setId(long id) {
        this.id = id;
    }

    public String getType() {
        return type;
    }

    public void setType(String type) {
        this.type = type;
    }

    public String getAuthor() {
        return author;
    }

    public void setAuthor(String author) {
        this.author = author;
    }

    public String getTitle() {
        return title;
    }

    public void setTitle(String title) {
        this.title = title;
    }

    public String getContent() {
        return content;
    }

    public void setContent(String content) {
        this.content = content;
    }

    public String getOutUrl() {
        return outUrl;
    }

    public void setOutUrl(String outUrl) {
        this.outUrl = outUrl;
    }

    public String getSeoKeyword() {
        return seoKeyword;
    }

    public void setSeoKeyword(String seoKeyword) {
        this.seoKeyword = seoKeyword;
    }

    public String getSeoDescription() {
        return seoDescription;
    }

    public void setSeoDescription(String seoDescription) {
        this.seoDescription = seoDescription;
    }

    public Integer getIsTop() {
        return isTop;
    }

    public void setIsTop(Integer isTop) {
        this.isTop = isTop;
    }

    public Date getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    public Date getUpdateTime() {
        return updateTime;
    }

    public void setUpdateTime(Date updateTime) {
        this.updateTime = updateTime;
    }
    
}
